﻿import request from '/@/utils/request';

enum Api {
	AddBaodanEntity = '/api/baodanEntity/add',
	DeleteBaodanEntity = '/api/baodanEntity/delete',
	UpdateBaodanEntity = '/api/baodanEntity/update',
	PageBaodanEntity = '/api/baodanEntity/page',
	DetailBaodanEntity = '/api/baodanEntity/detail',
	BatchDeleteBaodanEntity = '/api/baodanEntity/batchDelete',
	ExportBaodanEntity = '/api/baodanEntity/export',
	DownloadBaodanEntityTemplate = '/api/baodanEntity/downloadTemplate',
}

// 增加保单查询
export const addBaodanEntity = (params?: any) =>
	request({
		url: Api.AddBaodanEntity,
		method: 'post',
		data: params,
	});

// 删除保单查询
export const deleteBaodanEntity = (params?: any) =>
	request({
		url: Api.DeleteBaodanEntity,
		method: 'post',
		data: params,
	}); 

// 批量删除保单查询
export const batchDeleteBaodanEntity = (params?: any) =>
	request({
		url: Api.BatchDeleteBaodanEntity,
		method: 'post',
		data: params,
	});

// 编辑保单查询
export const updateBaodanEntity = (params?: any) =>
	request({
		url: Api.UpdateBaodanEntity,
		method: 'post',
		data: params,
	});

// 分页查询保单查询
export const pageBaodanEntity = (params?: any) =>
	request({
		url: Api.PageBaodanEntity,
		method: 'post',
		data: params,
	});

// 详情保单查询
export const detailBaodanEntity = (id: any) =>
	request({
		url: Api.DetailBaodanEntity,
		method: 'get',
		data: { id },
	});

// 导出
export const exportBaodanEntity = (params?: any) =>
	request({
		url: Api.ExportBaodanEntity,
		method: 'post',
		data: params,
		responseType: 'blob'
	});

// 导出
export const downloadBaodanEntityTemplate = (params?: any) =>
	request({
		url: Api.DownloadBaodanEntityTemplate,
		method: 'post',
		data: params,
		responseType: 'blob'
	});

	
